﻿package code
{
	
	public class GenericWeapon extends GameObject
	{
		// Type of bullet this weapon will fire
		protected var bulletType:Class;

		public function GenericWeapon(spawnX:int, spawnY:int, bType:Class)
		{
			super();
			
			this.x = spawnX;
			this.y = spawnY;
			this.bulletType = bType;
		}
		
		public function fireBullet(velX:int, velY:int):GenericBullet
		{
			var bullet:GenericBullet = new bulletType(parent.x + x, parent.y + y, velX, velY);
			
			return bullet;
		}
	}
}